Integrand size = 21, antiderivative size = 99 \[ \int (a+a \sec (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {a^3 \log (\cos (c+d x))}{d}-\frac {3 a^3 \sec (c+d x)}{d}-\frac {a^3 \sec ^2(c+d x)}{d}+\frac {2 a^3 \sec ^3(c+d x)}{3 d}+\frac {3 a^3 \sec ^4(c+d x)}{4 d}+\frac {a^3 \sec ^5(c+d x)}{5 d} \]
a^3*ln(cos(d*x+c))/d-3*a^3*sec(d*x+c)/d-a^3*sec(d*x+c)^2/d+2/3*a^3*sec(d*x +c)^3/d+3/4*a^3*sec(d*x+c)^4/d+1/5*a^3*sec(d*x+c)^5/d
Time = 0.24 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.93 \[ \int (a+a \sec (c+d x))^3 \tan ^3(c+d x) \, dx=-\frac {a^3 (142+280 \cos (2 (c+d x))+90 \cos (4 (c+d x))+\cos (3 (c+d x)) (60-75 \log (\cos (c+d x)))-150 \cos (c+d x) \log (\cos (c+d x))-15 \cos (5 (c+d x)) \log (\cos (c+d x))) \sec ^5(c+d x)}{240 d} \]
-1/240*(a^3*(142 + 280*Cos[2*(c + d*x)] + 90*Cos[4*(c + d*x)] + Cos[3*(c + d*x)]*(60 - 75*Log[Cos[c + d*x]]) - 150*Cos[c + d*x]*Log[Cos[c + d*x]] - 15*Cos[5*(c + d*x)]*Log[Cos[c + d*x]])*Sec[c + d*x]^5)/d
Time = 0.27 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.71, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 25, 4367, 27, 84, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^3(c+d x) (a \sec (c+d x)+a)^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\cot \left (c+d x+\frac {\pi }{2}\right )^3 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^3 \left (\csc \left (\frac {1}{2} (2 c+\pi )+d x\right ) a+a\right )^3dx\) |
\(\Big \downarrow \) 4367 |
\(\displaystyle -\frac {\int a^5 (1-\cos (c+d x)) (\cos (c+d x)+1)^4 \sec ^6(c+d x)d\cos (c+d x)}{a^2 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a^3 \int (1-\cos (c+d x)) (\cos (c+d x)+1)^4 \sec ^6(c+d x)d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 84 |
\(\displaystyle -\frac {a^3 \int \left (\sec ^6(c+d x)+3 \sec ^5(c+d x)+2 \sec ^4(c+d x)-2 \sec ^3(c+d x)-3 \sec ^2(c+d x)-\sec (c+d x)\right )d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^3 \left (-\frac {1}{5} \sec ^5(c+d x)-\frac {3}{4} \sec ^4(c+d x)-\frac {2}{3} \sec ^3(c+d x)+\sec ^2(c+d x)+3 \sec (c+d x)-\log (\cos (c+d x))\right )}{d}\) |
-((a^3*(-Log[Cos[c + d*x]] + 3*Sec[c + d*x] + Sec[c + d*x]^2 - (2*Sec[c + d*x]^3)/3 - (3*Sec[c + d*x]^4)/4 - Sec[c + d*x]^5/5))/d)
3.1.40.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_] : > Int[ExpandIntegrand[(a + b*x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && EqQ[b*e + a*f, 0] && !(ILtQ[n + p + 2, 0 ] && GtQ[n + 2*p, 0])
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _.), x_Symbol] :> Simp[1/(a^(m - n - 1)*b^n*d) Subst[Int[(a - b*x)^((m - 1)/2)*((a + b*x)^((m - 1)/2 + n)/x^(m + n)), x], x, Sin[c + d*x]], x] /; Fr eeQ[{a, b, c, d}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && Integer Q[n]
Time = 1.48 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.67
method | result | size |
derivativedivides | \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right )^{5}}{5}+\frac {3 \sec \left (d x +c \right )^{4}}{4}+\frac {2 \sec \left (d x +c \right )^{3}}{3}-\sec \left (d x +c \right )^{2}-3 \sec \left (d x +c \right )-\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) | \(66\) |
default | \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right )^{5}}{5}+\frac {3 \sec \left (d x +c \right )^{4}}{4}+\frac {2 \sec \left (d x +c \right )^{3}}{3}-\sec \left (d x +c \right )^{2}-3 \sec \left (d x +c \right )-\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) | \(66\) |
parts | \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {a^{3} \left (\frac {\sec \left (d x +c \right )^{5}}{5}-\frac {\sec \left (d x +c \right )^{3}}{3}\right )}{d}+\frac {3 a^{3} \left (\frac {\sec \left (d x +c \right )^{3}}{3}-\sec \left (d x +c \right )\right )}{d}+\frac {3 a^{3} \tan \left (d x +c \right )^{4}}{4 d}\) | \(104\) |
risch | \(-i a^{3} x -\frac {2 i a^{3} c}{d}-\frac {2 a^{3} \left (45 \,{\mathrm e}^{9 i \left (d x +c \right )}+30 \,{\mathrm e}^{8 i \left (d x +c \right )}+140 \,{\mathrm e}^{7 i \left (d x +c \right )}+142 \,{\mathrm e}^{5 i \left (d x +c \right )}+140 \,{\mathrm e}^{3 i \left (d x +c \right )}+30 \,{\mathrm e}^{2 i \left (d x +c \right )}+45 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(137\) |
a^3/d*(1/5*sec(d*x+c)^5+3/4*sec(d*x+c)^4+2/3*sec(d*x+c)^3-sec(d*x+c)^2-3*s ec(d*x+c)-ln(sec(d*x+c)))
Time = 0.30 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.92 \[ \int (a+a \sec (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {60 \, a^{3} \cos \left (d x + c\right )^{5} \log \left (-\cos \left (d x + c\right )\right ) - 180 \, a^{3} \cos \left (d x + c\right )^{4} - 60 \, a^{3} \cos \left (d x + c\right )^{3} + 40 \, a^{3} \cos \left (d x + c\right )^{2} + 45 \, a^{3} \cos \left (d x + c\right ) + 12 \, a^{3}}{60 \, d \cos \left (d x + c\right )^{5}} \]
1/60*(60*a^3*cos(d*x + c)^5*log(-cos(d*x + c)) - 180*a^3*cos(d*x + c)^4 - 60*a^3*cos(d*x + c)^3 + 40*a^3*cos(d*x + c)^2 + 45*a^3*cos(d*x + c) + 12*a ^3)/(d*cos(d*x + c)^5)
Time = 0.44 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.67 \[ \int (a+a \sec (c+d x))^3 \tan ^3(c+d x) \, dx=\begin {cases} - \frac {a^{3} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a^{3} \tan ^{2}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}}{5 d} + \frac {3 a^{3} \tan ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{4 d} + \frac {a^{3} \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{d} + \frac {a^{3} \tan ^{2}{\left (c + d x \right )}}{2 d} - \frac {2 a^{3} \sec ^{3}{\left (c + d x \right )}}{15 d} - \frac {3 a^{3} \sec ^{2}{\left (c + d x \right )}}{4 d} - \frac {2 a^{3} \sec {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a \sec {\left (c \right )} + a\right )^{3} \tan ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \]
Piecewise((-a**3*log(tan(c + d*x)**2 + 1)/(2*d) + a**3*tan(c + d*x)**2*sec (c + d*x)**3/(5*d) + 3*a**3*tan(c + d*x)**2*sec(c + d*x)**2/(4*d) + a**3*t an(c + d*x)**2*sec(c + d*x)/d + a**3*tan(c + d*x)**2/(2*d) - 2*a**3*sec(c + d*x)**3/(15*d) - 3*a**3*sec(c + d*x)**2/(4*d) - 2*a**3*sec(c + d*x)/d, N e(d, 0)), (x*(a*sec(c) + a)**3*tan(c)**3, True))
Time = 0.21 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.85 \[ \int (a+a \sec (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {60 \, a^{3} \log \left (\cos \left (d x + c\right )\right ) - \frac {180 \, a^{3} \cos \left (d x + c\right )^{4} + 60 \, a^{3} \cos \left (d x + c\right )^{3} - 40 \, a^{3} \cos \left (d x + c\right )^{2} - 45 \, a^{3} \cos \left (d x + c\right ) - 12 \, a^{3}}{\cos \left (d x + c\right )^{5}}}{60 \, d} \]
1/60*(60*a^3*log(cos(d*x + c)) - (180*a^3*cos(d*x + c)^4 + 60*a^3*cos(d*x + c)^3 - 40*a^3*cos(d*x + c)^2 - 45*a^3*cos(d*x + c) - 12*a^3)/cos(d*x + c )^5)/d
Leaf count of result is larger than twice the leaf count of optimal. 217 vs. \(2 (93) = 186\).
Time = 0.93 (sec) , antiderivative size = 217, normalized size of antiderivative = 2.19 \[ \int (a+a \sec (c+d x))^3 \tan ^3(c+d x) \, dx=-\frac {60 \, a^{3} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - 60 \, a^{3} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac {393 \, a^{3} + \frac {2085 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {2610 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {1970 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {805 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {137 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{{\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{5}}}{60 \, d} \]
-1/60*(60*a^3*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)) - 60*a^ 3*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)) + (393*a^3 + 2085*a ^3*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 2610*a^3*(cos(d*x + c) - 1)^2/( cos(d*x + c) + 1)^2 + 1970*a^3*(cos(d*x + c) - 1)^3/(cos(d*x + c) + 1)^3 + 805*a^3*(cos(d*x + c) - 1)^4/(cos(d*x + c) + 1)^4 + 137*a^3*(cos(d*x + c) - 1)^5/(cos(d*x + c) + 1)^5)/((cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)^ 5)/d
Time = 18.07 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.64 \[ \int (a+a \sec (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-10\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {62\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {70\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {64\,a^3}{15}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}-\frac {2\,a^3\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d} \]
((62*a^3*tan(c/2 + (d*x)/2)^4)/3 - (70*a^3*tan(c/2 + (d*x)/2)^2)/3 - 10*a^ 3*tan(c/2 + (d*x)/2)^6 + 2*a^3*tan(c/2 + (d*x)/2)^8 + (64*a^3)/15)/(d*(5*t an(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2)^6 - 5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 - 1)) - (2*a^3*atanh(tan(c/ 2 + (d*x)/2)^2))/d